package de.moc.server;

import com.google.gson.Gson;

import de.moc.shared.*;

public class JSONMapper {
	private Gson gson;
	
	public JSONMapper() {
		gson = new Gson();
	}

	public String OtoJ(Survey survey) {
		return gson.toJson(survey);
	}

	public Survey JtoO(String json) {
		return gson.fromJson(json, Survey.class);
	}
}
